UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nFx5DY8ZoKRReXJ6O+IFtPsGwt2FFpQeBA9lnMXKC54=' 
WHERE 
  key_id = 'a95186f869b661a50a3ed6dcfc01078cbfd96caf5768282354115f32be960679' 
  AND (
    token = 'nFx5DY8ZoKRReXJ6O+IFtPsGwt2FFpQeBA9lnMXKC54=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030