UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GLsKocEIKIxRihAeV8QqRnTltPBDm/YcUc+vQEvIl3U=' 
WHERE 
  key_id = '93068c9b007081df652414d13d2986341020dfbfdc4541af3563e7a9eefaafe6' 
  AND (
    token = 'GLsKocEIKIxRihAeV8QqRnTltPBDm/YcUc+vQEvIl3U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026