UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Q7wmfTSA7LnLtgGxlSEUHp55BgjVWsUSNJ6CmwKhS4w=' 
WHERE 
  key_id = '890d14df2851c2a86a7f2d5ef6bd9ddc3d585e45f0a0ed89d505f75645c0efb7' 
  AND (
    token = 'Q7wmfTSA7LnLtgGxlSEUHp55BgjVWsUSNJ6CmwKhS4w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047