UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+LOS11A0rFUGiUCuDuWAtec8wAaK3Y8Yw2nJD+8w7Vc=' 
WHERE 
  key_id = '7aeb592e2ee646ff8096ca3bf342683b684293dab3e54b67644ddfea4cbc1fab' 
  AND (
    token = '+LOS11A0rFUGiUCuDuWAtec8wAaK3Y8Yw2nJD+8w7Vc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00053