UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FCHcjEA5r43/nkZqBUspmF3LQTgA2x8njdH5Rjud+N4='
WHERE
key_id = '73d08edbac789c25b02edf7e80c4e79f62ae36b9448eb4f33cd81fd2bc60b879'
AND (
token = 'FCHcjEA5r43/nkZqBUspmF3LQTgA2x8njdH5Rjud+N4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)