UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'urMbBxuZNoMZNwtn7X3jJKM5jFo79eW83/HO2EqfweI='
WHERE
key_id = '65b36714e306073be31564f9797c92998ec2b3ea573a79fa75d570117a7f3cb2'
AND (
token = 'urMbBxuZNoMZNwtn7X3jJKM5jFo79eW83/HO2EqfweI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)