UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+UnRZY9Ded0pc/kSwYVRm93XEzA2XXUPZbibN5L22qc=' 
WHERE 
  key_id = 'a853e52d2770739d486dd963a511582dae532a07108ea93458e1165ae58438cd' 
  AND (
    token = '+UnRZY9Ded0pc/kSwYVRm93XEzA2XXUPZbibN5L22qc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030