UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QcubnPT6zItAK76ZI9MTqvrxliKdRWiMrNDpcJvJ8BU='
WHERE
key_id = '921c0a42dbca9493f7c7e3ed9d889c2f01ac33122234f05137c655d43623b2f2'
AND (
token = 'QcubnPT6zItAK76ZI9MTqvrxliKdRWiMrNDpcJvJ8BU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)