UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2lITzETD7dxmJr3QDnfw/kISnbwtZbhOZ5M7xG8VZoA=' 
WHERE 
  key_id = '298063728349356d416acf59fa185b72a45b760ce077859319cc2450f90c604a' 
  AND (
    token = '2lITzETD7dxmJr3QDnfw/kISnbwtZbhOZ5M7xG8VZoA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031