UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Xjx7bgcjXWtJ2Gf8sIkL6PCspxnWvzkACvHAu79PUo8='
WHERE
key_id = '43e6c2e37da582142ab48155b69c21da0fcc3fcbddd36efa51877f7186c41b55'
AND (
token = 'Xjx7bgcjXWtJ2Gf8sIkL6PCspxnWvzkACvHAu79PUo8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)