UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/0tFUOunC0j1mIac+ekJ7HcWEzDZDJwPFCEbs+y0w2k=' 
WHERE 
  key_id = '0244a651ed9992e3d5938de2ef53157710c6a16d9fb92bb97c33176e2ca8e209' 
  AND (
    token = '/0tFUOunC0j1mIac+ekJ7HcWEzDZDJwPFCEbs+y0w2k=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031