UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Imr2H4pfo2T5t6vlZldLgZDLADKmHNP5RDDm+dAbuAM='
WHERE
key_id = 'ee36ce7f16b8f4ce09fd317e3682d12b4048f9313be2c91f768c60da0cb2f36f'
AND (
token = 'Imr2H4pfo2T5t6vlZldLgZDLADKmHNP5RDDm+dAbuAM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)