UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7E6OAML69YwqO/Gh/GxS+RqJjyBsVVFZFVn5CH06iGE='
WHERE
key_id = '4f0dc9c7ea9f10fb735a930bc560c85f968bde17123b013d63f03b1b1cca48fe'
AND (
token = '7E6OAML69YwqO/Gh/GxS+RqJjyBsVVFZFVn5CH06iGE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)