UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'w4zd2AlTKtSTWB/WUWf0OQy0nu/3p/vnxQmm1CiWkeU=' 
WHERE 
  key_id = '76ce516d876c51f833ed24ae0276c1493800e3ceb097718e3dcfb188b85186fc' 
  AND (
    token = 'w4zd2AlTKtSTWB/WUWf0OQy0nu/3p/vnxQmm1CiWkeU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039