UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2TzaGE0uPLgAO+tM2dz85SniC9r30usgHY0CeR/LTqA='
WHERE
key_id = 'bc7c99f2f5e6eb46c800e3ede49007db8d22ee42ca0babebb56695e5c65d9139'
AND (
token = '2TzaGE0uPLgAO+tM2dz85SniC9r30usgHY0CeR/LTqA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)