UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SGOPJ0i8IHDxdAlKQu7bPp4gftDo/V7I/ymbSVQQFCg='
WHERE
key_id = '2ee36c855ee2a199143498053e32cc6bc38cb97fe3394bc49e0a3fff7a37fc0f'
AND (
token = 'SGOPJ0i8IHDxdAlKQu7bPp4gftDo/V7I/ymbSVQQFCg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)