UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Bv6blB4F3f4O9hnmzqmHrjh7FpOLxfJYzmqMeo5h/7E='
WHERE
key_id = 'e8b68c6487d3e89f164aa8ecacf7d36e2735ac9d2999ed01f60db03eb9ec2705'
AND (
token = 'Bv6blB4F3f4O9hnmzqmHrjh7FpOLxfJYzmqMeo5h/7E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)