UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EGcc+XwYuSnV3ak5wm3UXdPhYUlhfO1SkY5HFP5MZ/0='
WHERE
key_id = 'df27c26cedba8f3f2d29573b873cfbd0352c56b3d4dca6679179c4fdd3b37037'
AND (
token = 'EGcc+XwYuSnV3ak5wm3UXdPhYUlhfO1SkY5HFP5MZ/0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)