UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PVyPe2PdYiGIiUTKAbnCJw5tQbOXGvdrWbRcak6c4/A=' 
WHERE 
  key_id = '4a3cb23d2aea2b0e772a4aae2817f730fcafdb4429552b6697eaa4d46e8d6b7a' 
  AND (
    token = 'PVyPe2PdYiGIiUTKAbnCJw5tQbOXGvdrWbRcak6c4/A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015