UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VDvnvGGJpUSeekKXz/KxEls053NnyVz56o9kFBpbOjU='
WHERE
key_id = '4fd1f46ba28ce21d3d7ebfb435a2399cfb3fa17679d8f2fcdae271e408d2cb7e'
AND (
token = 'VDvnvGGJpUSeekKXz/KxEls053NnyVz56o9kFBpbOjU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)