UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L6MkjafHaHZJmNsdRfOlsRPsS0MaRmk1Bbx1KbkFbKM='
WHERE
key_id = '4fd2a998b8890e23a5419ec517c92bb6b2060cb8ee1a44921f0a1e7d30e3a2de'
AND (
token = 'L6MkjafHaHZJmNsdRfOlsRPsS0MaRmk1Bbx1KbkFbKM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)