UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l4AreLwEFzDfwByLqtklri6FWsUX54ZYa4doC/i2Ick='
WHERE
key_id = '272fcd43408b0faad8416c291a8cf0e9b1da8ec8504bbab5c8f9a934baf3cf92'
AND (
token = 'l4AreLwEFzDfwByLqtklri6FWsUX54ZYa4doC/i2Ick='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)