UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jZj7abwL6sXGp2x7860hg80uWRJTToyMkhB3xG6RB8E='
WHERE
key_id = '06d3c5e49a7c2d165fa503e64d738bf0f7037086c1734920a473bb6688c6be5b'
AND (
token = 'jZj7abwL6sXGp2x7860hg80uWRJTToyMkhB3xG6RB8E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)