UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LSk+uhV2ERQPxw5nzPs6GyJcQKKn1fCEkg1cMwF2jzs='
WHERE
key_id = '479618e1e88aa52774188d0226d17e2ab94b53889c13c51dfaaa0732e03803be'
AND (
token = 'LSk+uhV2ERQPxw5nzPs6GyJcQKKn1fCEkg1cMwF2jzs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)