UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OVHGrOMs++d89g9Fr8SShiQFUiy1OgWqydk3H8ySjcI='
WHERE
key_id = '41f64a27aeeb44d103d797f7ed69f331fbe59c17e23174cc9707af393b9b99bc'
AND (
token = 'OVHGrOMs++d89g9Fr8SShiQFUiy1OgWqydk3H8ySjcI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)