UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+pzFBXjz9fFU6AkchCBAFASsGwvH4zB+R2Ixg3YtrLo=' 
WHERE 
  key_id = '406147636bd1a03d67d2bbbd32e295ddfb4d201ec5e89e2bd1d890d518003b78' 
  AND (
    token = '+pzFBXjz9fFU6AkchCBAFASsGwvH4zB+R2Ixg3YtrLo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033