UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'XkxaElF0PV/V8hrAGuMBHtteQilv1w/Fn3S/atmTG4M=' 
WHERE 
  key_id = '4fcc2845160e3d45f430d9530e54c4a2dc57d75101c08d37da56fe9126ab444e' 
  AND (
    token = 'XkxaElF0PV/V8hrAGuMBHtteQilv1w/Fn3S/atmTG4M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046