UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zRgcC6PgX7gvlU0NhDKbMb7kdVMVgbtpnVxtrzcoTyI=' 
WHERE 
  key_id = '5b8b75dd31ee6fc108f2b149ccf09100fd24fe15c4de4612510d0e814670f0d6' 
  AND (
    token = 'zRgcC6PgX7gvlU0NhDKbMb7kdVMVgbtpnVxtrzcoTyI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043