UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Zq3oCqETZDPXgXKLKDuEOdEHsearU3kRdET3MRx8/q0=' 
WHERE 
  key_id = '55d07de626f928c0ff192d5af7ebdac2271cbeb81a22e81e81d67e497075dabc' 
  AND (
    token = 'Zq3oCqETZDPXgXKLKDuEOdEHsearU3kRdET3MRx8/q0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021