UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zZJBmvxzlbaTlylGvAcH1JMmvl3KqiYGTDXUTE/UDU0='
WHERE
key_id = '0ccc00062e8eaacff5caf3d27fd0040533433aa4d5d27d852ce8d6fa424e3705'
AND (
token = 'zZJBmvxzlbaTlylGvAcH1JMmvl3KqiYGTDXUTE/UDU0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)