UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'cULH5LX0z0fTzIpd4dvoMbjPuCWqzhA6eN97UxUDeG4=' 
WHERE 
  key_id = '68b92c1f93f4db43f8bc467de782812829f59e37baddfbc5cf6a61ffcefb2b44' 
  AND (
    token = 'cULH5LX0z0fTzIpd4dvoMbjPuCWqzhA6eN97UxUDeG4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042