UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5hon8GKQq/tQlHHlNippn/CcOvlqCuwTrmy/jYzaZe0='
WHERE
key_id = '800d585e406fbe5ea11986e0e593a17fc786a13bab1dcf5fb8ac612a0bc50b63'
AND (
token = '5hon8GKQq/tQlHHlNippn/CcOvlqCuwTrmy/jYzaZe0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)