UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0mS22d/VSkPicqa1pKcghWIT+zDKmNB6lFFSiMHGHe8='
WHERE
key_id = 'fc5d6ded4ddcc98526ac190a2d93e7c05ae57bd5686e8db48f3c94b814308aef'
AND (
token = '0mS22d/VSkPicqa1pKcghWIT+zDKmNB6lFFSiMHGHe8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)